<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/VerificationRules.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>

  </div>
</template>

<script>
import extend from "@/extension/mall/VerificationRules.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "核销规则",
        name: "VerificationRules",
        url: "/VerificationRules/",
        sortName: "id",
      },
      extend: extend,
      editFormFields: {
        timeContainer: "",
        rulesName: "",
        expireOperation: "",
        playDate: "",
        playStartDate: "",
        playEndDate: "",
        fewDaysAgo: "",
        fewDaysLater: "",
        creator: "",
        createDate: "",
        modifier: "",
        modifyDate: "",
        modifyID: "",
        createID: "",
        merchantCode: "",
        merchantName: "",
        playExceedNum: "",
      },
      editFormOptions: [
        [
          {
            title: "规则名称",
            required: true,
            field: "rulesName",
            colSize: 6,
            type: "text",
          },
        ],
        [
          {
            dataKey: "playDate",
            data: [],
            title: "游玩日期",
            field: "playDate",
            colSize: 6,
            type: "radio",
          },
          {
            title: "游玩固定起止时间",
            field: "timeContainer",
            type: "datetime",
            range: true,
            colSize: 6,
            hidden: true,
          },
          {
            title: "游玩固定开始时间",
            field: "playStartDate",
            disabled: true,
            colSize: 6,
            type: "datetime",
            hidden: true,
          },
          {
            title: "游玩日期前几天",
            field: "fewDaysAgo",
            colSize: 6,
            type: "number",
            hidden: true,
          },
          {
            title: "游玩固定结束时间",
            field: "playEndDate",
            disabled: true,
            colSize: 6,
            type: "datetime",
            hidden: true,
          },
          {
            title: "游玩日期后几天",
            field: "fewDaysLater",
            colSize: 6,
            type: "number",
            hidden: true,
          },
        ],
        [
          {
            dataKey: "expireOperation",
            data: [],
            title: "过期操作",
            field: "expireOperation",
            colSize: 5,
            type: "select",
          },
          {
            dataKey: "playExceedNum",
            data: [],
            title: "",
            field: "playExceedNum",
            cont: ["超出游玩开始时间 ", " 天,"],
            type: "textSpan",
            colSize: 5,
            hidden: true,
          },
        ],
        [
          //   {"title":"","required":true,"field":"id","disabled":true,"type":"number"},
          { title: "创建人", field: "creator", disabled: true },
          { title: "创建时间", field: "createDate", disabled: true },
          { title: "修改人", field: "modifier", disabled: true },
          { title: "修改时间", field: "modifyDate", disabled: true },
          {
            title: "修改人ID",
            field: "modifyID",
            disabled: true,
            type: "number",
          },
          {
            title: "创建人ID",
            field: "createID",
            disabled: true,
            type: "number",
          },
        ],
      ],
      searchFormFields: { rulesName: "", playDate: "", expireOperation: "" },
      searchFormOptions: [
        [
          { title: "规则名称", field: "rulesName", type: "like" },
          {
            dataKey: "expireOperation",
            data: [],
            title: "过期操作",
            field: "expireOperation",
            type: "select",
          },
          {
            dataKey: "playDate",
            data: [],
            title: "游玩日期类型",
            field: "playDate",
            type: "select",
          },
        ],
      ],
      columns: [
        {
          field: "rulesName",
          title: "规则名称",
          type: "string",
          width: 120,
          require: true,
          align: "left",
          sortable: true,
        },
        {
          field: "id",
          title: "id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "playDate",
          title: "游玩日期类型",
          type: "int",
          bind: { key: "playDate", data: [] },
          width: 130,
          align: "left",
        },
        {
          field: "playStartDate",
          title: "游玩固定开始时间",
          type: "datetime",
          width: 160,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "playEndDate",
          title: "游玩固定结束时间",
          type: "datetime",
          width: 160,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "fewDaysAgo",
          title: "游玩日期前几天",
          type: "int",
          width: 120,
          readonly: true,
          align: "left",
        },
        {
          field: "fewDaysLater",
          title: "游玩日期后几天",
          type: "int",
          width: 120,
          readonly: true,
          align: "left",
        },
        {
          field: "expireOperation",
          title: "操作",
          type: "int",
          bind: { key: "expireOperation", data: [] },
          width: 80,
          align: "left",
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 100,
          readonly: true,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          readonly: true,
          align: "left",
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "modifyID",
          title: "修改人ID",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          align: "left",
        },
        {
          field: "createID",
          title: "创建人ID",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          align: "left",
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
<style lang="scss">
.VerificaonRules {
  margin-left: 10px;
  .hover {
    color: #82aaf1;
    border-color: rgb(218, 230, 251);
    background-color: rgb(243, 247, 254);
  }
  .inputWid90 {
    width: 90px;
  }
  .gz_maTop10 {
    margin-top: 10px;
  }
}
.VerificationRules {
  .ivu-radio-group-item {
    width: 100%;
  }
}
</style>